<!DOCTYPE html>
<html>
<head>
<title>readme.md</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">

<style>
/* https://github.com/microsoft/vscode/blob/master/extensions/markdown-language-features/media/markdown.css */
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

body {
	font-family: var(--vscode-markdown-font-family, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif);
	font-size: var(--vscode-markdown-font-size, 14px);
	padding: 0 26px;
	line-height: var(--vscode-markdown-line-height, 22px);
	word-wrap: break-word;
}

#code-csp-warning {
	position: fixed;
	top: 0;
	right: 0;
	color: white;
	margin: 16px;
	text-align: center;
	font-size: 12px;
	font-family: sans-serif;
	background-color:#444444;
	cursor: pointer;
	padding: 6px;
	box-shadow: 1px 1px 1px rgba(0,0,0,.25);
}

#code-csp-warning:hover {
	text-decoration: none;
	background-color:#007acc;
	box-shadow: 2px 2px 2px rgba(0,0,0,.25);
}

body.scrollBeyondLastLine {
	margin-bottom: calc(100vh - 22px);
}

body.showEditorSelection .code-line {
	position: relative;
}

body.showEditorSelection .code-active-line:before,
body.showEditorSelection .code-line:hover:before {
	content: "";
	display: block;
	position: absolute;
	top: 0;
	left: -12px;
	height: 100%;
}

body.showEditorSelection li.code-active-line:before,
body.showEditorSelection li.code-line:hover:before {
	left: -30px;
}

.vscode-light.showEditorSelection .code-active-line:before {
	border-left: 3px solid rgba(0, 0, 0, 0.15);
}

.vscode-light.showEditorSelection .code-line:hover:before {
	border-left: 3px solid rgba(0, 0, 0, 0.40);
}

.vscode-light.showEditorSelection .code-line .code-line:hover:before {
	border-left: none;
}

.vscode-dark.showEditorSelection .code-active-line:before {
	border-left: 3px solid rgba(255, 255, 255, 0.4);
}

.vscode-dark.showEditorSelection .code-line:hover:before {
	border-left: 3px solid rgba(255, 255, 255, 0.60);
}

.vscode-dark.showEditorSelection .code-line .code-line:hover:before {
	border-left: none;
}

.vscode-high-contrast.showEditorSelection .code-active-line:before {
	border-left: 3px solid rgba(255, 160, 0, 0.7);
}

.vscode-high-contrast.showEditorSelection .code-line:hover:before {
	border-left: 3px solid rgba(255, 160, 0, 1);
}

.vscode-high-contrast.showEditorSelection .code-line .code-line:hover:before {
	border-left: none;
}

img {
	max-width: 100%;
	max-height: 100%;
}

a {
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

a:focus,
input:focus,
select:focus,
textarea:focus {
	outline: 1px solid -webkit-focus-ring-color;
	outline-offset: -1px;
}

hr {
	border: 0;
	height: 2px;
	border-bottom: 2px solid;
}

h1 {
	padding-bottom: 0.3em;
	line-height: 1.2;
	border-bottom-width: 1px;
	border-bottom-style: solid;
}

h1, h2, h3 {
	font-weight: normal;
}

table {
	border-collapse: collapse;
}

table > thead > tr > th {
	text-align: left;
	border-bottom: 1px solid;
}

table > thead > tr > th,
table > thead > tr > td,
table > tbody > tr > th,
table > tbody > tr > td {
	padding: 5px 10px;
}

table > tbody > tr + tr > td {
	border-top: 1px solid;
}

blockquote {
	margin: 0 7px 0 5px;
	padding: 0 16px 0 10px;
	border-left-width: 5px;
	border-left-style: solid;
}

code {
	font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback";
	font-size: 1em;
	line-height: 1.357em;
}

body.wordWrap pre {
	white-space: pre-wrap;
}

pre:not(.hljs),
pre.hljs code > div {
	padding: 16px;
	border-radius: 3px;
	overflow: auto;
}

pre code {
	color: var(--vscode-editor-foreground);
	tab-size: 4;
}

/** Theming */

.vscode-light pre {
	background-color: rgba(220, 220, 220, 0.4);
}

.vscode-dark pre {
	background-color: rgba(10, 10, 10, 0.4);
}

.vscode-high-contrast pre {
	background-color: rgb(0, 0, 0);
}

.vscode-high-contrast h1 {
	border-color: rgb(0, 0, 0);
}

.vscode-light table > thead > tr > th {
	border-color: rgba(0, 0, 0, 0.69);
}

.vscode-dark table > thead > tr > th {
	border-color: rgba(255, 255, 255, 0.69);
}

.vscode-light h1,
.vscode-light hr,
.vscode-light table > tbody > tr + tr > td {
	border-color: rgba(0, 0, 0, 0.18);
}

.vscode-dark h1,
.vscode-dark hr,
.vscode-dark table > tbody > tr + tr > td {
	border-color: rgba(255, 255, 255, 0.18);
}

</style>

<style>
/* Tomorrow Theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */

/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
	color: #8e908c;
}

/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
	color: #c82829;
}

/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
	color: #f5871f;
}

/* Tomorrow Yellow */
.hljs-attribute {
	color: #eab700;
}

/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
	color: #718c00;
}

/* Tomorrow Blue */
.hljs-title,
.hljs-section {
	color: #4271ae;
}

/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
	color: #8959a8;
}

.hljs {
	display: block;
	overflow-x: auto;
	color: #4d4d4c;
	padding: 0.5em;
}

.hljs-emphasis {
	font-style: italic;
}

.hljs-strong {
	font-weight: bold;
}
</style>

<style>
/*
 * Markdown PDF CSS
 */

 body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif, "Meiryo";
	padding: 0 12px;
}

pre {
	background-color: #f8f8f8;
	border: 1px solid #cccccc;
	border-radius: 3px;
	overflow-x: auto;
	white-space: pre-wrap;
	overflow-wrap: break-word;
}

pre:not(.hljs) {
	padding: 23px;
	line-height: 19px;
}

blockquote {
	background: rgba(127, 127, 127, 0.1);
	border-color: rgba(0, 122, 204, 0.5);
}

.emoji {
	height: 1.4em;
}

code {
	font-size: 14px;
	line-height: 19px;
}

/* for inline code */
:not(pre):not(.hljs) > code {
	color: #C9AE75; /* Change the old color so it seems less like an error */
	font-size: inherit;
}

/* Page Break : use <div class="page"/> to insert page break
-------------------------------------------------------- */
.page {
	page-break-after: always;
}

</style>

<script src="https://unpkg.com/mermaid/dist/mermaid.min.js"></script>
</head>
<body>
  <script>
    mermaid.initialize({
      startOnLoad: true,
      theme: document.body.classList.contains('vscode-dark') || document.body.classList.contains('vscode-high-contrast')
          ? 'dark'
          : 'default'
    });
  </script>
<h1 id="1-pyqt%E5%BC%80%E5%8F%91">1. PYQT开发</h1>
<!-- TOC -->
<ul>
<li><a href="#1-pyqt%E5%BC%80%E5%8F%91">1. PYQT开发</a>
<ul>
<li><a href="#11-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E8%AE%BE%E7%BD%AE">1.1. 开发环境设置</a></li>
<li><a href="#12-pyqt5-%E7%BB%98%E5%88%B6ui">1.2. PYQT5 绘制UI</a></li>
<li><a href="#13-%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91">1.3. 代码开发</a></li>
<li><a href="#14-%E8%BF%90%E8%A1%8C">1.4. 运行</a></li>
<li><a href="#15-%E5%AD%A6%E4%B9%A0%E8%B5%84%E6%BA%90">1.5. 学习资源</a></li>
<li><a href="#16-%E4%BD%BF%E7%94%A8git">1.6. 使用git</a></li>
<li><a href="#17-github">1.7. github</a></li>
<li><a href="#18-%E5%AD%A6%E4%B9%A0%E4%BB%BB%E5%8A%A1">1.8. 学习任务</a></li>
</ul>
</li>
</ul>
<!-- /TOC -->
<h2 id="11-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E8%AE%BE%E7%BD%AE">1.1. 开发环境设置</h2>
<ul>
<li>vs code 安装
<ul>
<li>路径：<a href="https://code.visualstudio.com/">https://code.visualstudio.com/</a></li>
</ul>
</li>
<li>python安装
<ul>
<li>路径：<a href="https://www.python.org/">https://www.python.org/</a><br>
<img src="./.pic/vs-pytyon-debug-4.png" alt="pic - 5"><br>
安装时自动添加路径<br>
<img src="./.pic/vs-pytyon-debug-5.png" alt="pic - 6"><br>
安装插件<br>
<img src="./.pic/vs-pytyon-debug-7.png" alt="pic - 7"><br>
<img src="./.pic/vs-pytyon-debug-9.png" alt="pic - 9"><br>
打开工程<br>
<img src="./.pic/vs-pytyon-debug-8.png" alt="pic - 8"><br>
安装中文插件<br>
<img src="./.pic/vs-pytyon-debug-10.png" alt="pic - 10"><br>
手动设置环境变量<br>
<img src="./.pic/vs-pytyon-debug-11.png" alt="pic - 10"></li>
</ul>
</li>
<li>修订pip 源为中国<br>
解决pip下载慢的问题<br>
参考 <a href="https://blog.csdn.net/yuzaipiaofei/article/details/80891108">https://blog.csdn.net/yuzaipiaofei/article/details/80891108</a><br>
修改源采用  修改ini文件的方式
正确更新源之后，pip安装的时候会以替换的源的路径显示<br>
<img src="./.pic/vs-pytyon-debug-19.png" alt="pic - 19"></li>
<li>安装pyqt5
<ul>
<li>打开vscode，打开终端</li>
<li>输入  pip.exe install pyqt5，如下图<br>
<img src="./pic/../.pic/pyqt5_intsall.png" alt="pyqt5安装"></li>
<li>输入  pip.exe install pyqt5-tools,方式如上<br>
打开画图工具pyqt5designer.exe<br>
<img src="./.pic/vs-pytyon-debug-20.png" alt="pic - 20"></li>
</ul>
</li>
<li>vs code 安装其他插件
<ul>
<li>使用vs code 的插件安装，如图!<br>
<img src="./.pic/vs_code-1.png" alt="vs code"></li>
<li>输入pyqt 安装qt相关插件</li>
<li>输入python 安装python相关的插件</li>
</ul>
</li>
<li>git 安装
<ul>
<li>网址： <a href="https://git-scm.com/downloads">https://git-scm.com/downloads</a></li>
<li>如何使用git<br>
<img src="./.pic/git-1.png" alt="git - 1 "></li>
</ul>
</li>
</ul>
<h2 id="12-pyqt5-%E7%BB%98%E5%88%B6ui">1.2. PYQT5 绘制UI</h2>
<ul>
<li>使用绘图工具 pyqt5designer</li>
<li>工具路径，安装完pyqt5 和 tool之后在，python的安装路径里面会自带该执行文件。<br>
<img src="./.pic/pyqtdesigner_path.png" alt="安装路径"></li>
<li>使用绘图工具，打开之后如下所示<br>
<img src="./.pic/qtdesigner_use.png" alt="安装路径"></li>
<li>生成可以提供给python的ui文件
pyuic5.exe .\test\ui\main.ui -o .\test\src\main_ui.py<br>
<img src="./.pic/ui_2_py.png" alt="ui-2-py"></li>
<li>查看实时效果 ctrl + r</li>
<li>学习资源<br>
<a href="https://zhuanlan.zhihu.com/p/75673557?utm_source=wechat_session&amp;utm_medium=social&amp;utm_oi=820393199897030656">https://zhuanlan.zhihu.com/p/75673557?utm_source=wechat_session&amp;utm_medium=social&amp;utm_oi=820393199897030656</a></li>
</ul>
<h2 id="13-%E4%BB%A3%E7%A0%81%E5%BC%80%E5%8F%91">1.3. 代码开发</h2>
<ul>
<li>使用git从gitee导入代码
<ul>
<li>指令：git clone <a href="https://gitee.com/zhengjunqiang/learn_2.git">https://gitee.com/zhengjunqiang/learn_2.git</a><br>
<img src="./.pic/git-2.png" alt="git -2"></li>
</ul>
</li>
<li>添加工程到vscode<br>
<img src="./.pic/vs_use2.png" alt="vs use 2"></li>
</ul>
<h2 id="14-%E8%BF%90%E8%A1%8C">1.4. 运行</h2>
<ul>
<li>python 程序运行<br>
打开一个终端，这样可以看到程序运行的结果<br>
<img src="./.pic/vs-pytyon-debug-14.png" alt="vs-code-debug-14"><br>
运行python程序<br>
<img src="./.pic/vs-pytyon-debug-13.png" alt="vs-code-debug-13"><br>
选择使用python程序运行<br>
<img src="./.pic/vs-pytyon-debug-15.png" alt="vs-code-debug-14"><br>
hello world 程序运行结果
<img src="./.pic/vs-pytyon-debug-16.png" alt="vs-code-debug-15"></li>
<li>调试运行<br>
<img src="./.pic/vs-pytyon-debug-1.png" alt="vs-code-debug-1"><br>
<img src="./.pic/vs-pytyon-debug-2.png" alt="vs-code-debug-2"></li>
<li>程序执行效果<br>
<img src="./.pic/vs-pytyon-debug-3.png" alt="vs-code-debug-3"></li>
</ul>
<h2 id="15-%E5%AD%A6%E4%B9%A0%E8%B5%84%E6%BA%90">1.5. 学习资源</h2>
<ul>
<li>python 学习资源<br>
<a href="https://www.runoob.com/python/python-tutorial.html">https://www.runoob.com/python/python-tutorial.html</a></li>
<li>qt学习资源<br>
<a href="https://zhuanlan.zhihu.com/p/75673557?utm_source=wechat_session&amp;utm_medium=social&amp;utm_oi=820393199897030656">https://zhuanlan.zhihu.com/p/75673557?utm_source=wechat_session&amp;utm_medium=social&amp;utm_oi=820393199897030656</a></li>
</ul>
<h2 id="16-%E4%BD%BF%E7%94%A8git">1.6. 使用git</h2>
<ul>
<li>代码获取<br>
<a href="https://gitee.com/zhengjunqiang/learn_2.git">https://gitee.com/zhengjunqiang/learn_2.git</a><br>
<img src="./.pic/vs-pytyon-debug-12.png" alt="pig-11"></li>
<li>更新代码<br>
git pull</li>
<li>使用gitee添加仓库<br>
<img src="./.pic/vs-pytyon-debug-21.png" alt="pig-21"></li>
<li>配置仓库<br>
<img src="./.pic/vs-pytyon-debug-22.png" alt="pig-22"></li>
<li>注意事项
<ul>
<li>不要出现中文</li>
</ul>
</li>
<li>下装仓库到本地
<img src="./.pic/vs-pytyon-debug-23.png" alt="pig-23"><br>
<img src="./.pic/vs-pytyon-debug-24.png" alt="pig-24"><br>
git add ./<br>
git commit ./<br>
git push</li>
</ul>
<h2 id="17-github">1.7. github</h2>
<p><a href="https://github.com/">https://github.com/</a></p>
<h2 id="18-%E5%AD%A6%E4%B9%A0%E4%BB%BB%E5%8A%A1">1.8. 学习任务</h2>
<ul>
<li>任务1
<ul>
<li>安装vs code</li>
<li>安装python</li>
<li>安装git</li>
<li>导入工程</li>
<li>查看md文件</li>
<li>安装py插件</li>
<li>申请一个gitee账号 <a href="https://gitee.com/">https://gitee.com/</a></li>
<li>使用git获取到文件</li>
<li>运行hello.py 程序</li>
</ul>
</li>
<li>任务2
<ul>
<li>安装pyqt5</li>
<li>运行界面</li>
</ul>
</li>
<li>任务3
<ul>
<li>修订界面2</li>
<li>使界面在python的代码里面生效</li>
<li>通过button 修改text控件的属性</li>
</ul>
</li>
<li>任务4
<ul>
<li>注册一个gitee账号  <a href="https://gitee.com/">https://gitee.com/</a></li>
<li>使用gitee自己创建一个仓库，并提交代码到自己的仓库</li>
<li>学习python 菜鸟教程，尝试提交代码，并修改</li>
</ul>
</li>
</ul>

</body>
</html>
